function fit = my_schaffer(P, Vxx, Vyy, Vxy, Pvx, Pvy, Is, In, theta )

f1=P-Is+In;
f2=Vxx-Is*cos(theta)^2+1/3*In;
f3=Vyy-Is*sin(theta)^2+1/3*In;
f4=Pvx-Is*cos(theta);
f5=Pvy-Is*sin(theta);
f6=Vxy-Is*cos(theta)*sin(theta);

fit=f1^2+f2^2+f3^2+f4^2+f5^2+f6^2;



